package org.jsbd.boss.service;

import java.util.List;
import java.util.Map;

import org.jsbd.boss.domian.ChannelApkConfigBaseModel;
import org.jsbd.boss.domian.ChannelApkConfigTimeModel;

/**
 *
 * 渠道限量控制service
 * @author <a href="mailto:zhangbinghua@zhexinit.com" >zbh</a>
 * @version 1.0.0
 */
public interface IChannelLimitService {

	
	public boolean checkLimit(String mark);
	
	public ChannelApkConfigTimeModel getCurrentLimitModelBymark(String mark);


/**
	 * getCurrentRetentLimitModelBymark:TODO 请描述该方法是做什么用途的
	 * @author <a href="mailto:zhangbinghua@zhexinit.com" >zbh</a>
	 * @param mark
	 * @return
	 */
	public ChannelApkConfigTimeModel getCurrentRetentLimitModelBymark(String mark);
	
	/**
	 * 
	 * getCurrentAddLimitModel:新增正态模型
	 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
	 * @param mark
	 * @param dayLimit
	 * @return
	 */
	public ChannelApkConfigTimeModel getCurrentAddLimitModel(String mark, int dayLimit);

	/**
	 * getChannelApkConfigTimeModelList:TODO 请描述该方法是做什么用途的
	 * @author <a href="mailto:zhangbinghua@zhexinit.com" >zbh</a>
	 * @param mark
	 * @param type
	 * @return
	 */
	public List<ChannelApkConfigTimeModel> getChannelApkConfigTimeModelList(String mark, String type);
	
	public void saveLimitModelBymark(ChannelApkConfigTimeModel model);
	
	public void saveLimitModelList(List<ChannelApkConfigTimeModel> list,int type);

	/**
	 * getTimeModelByMark:TODO 请描述该方法是做什么用途的
	 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
	 * @param mark
	 * @param daylimit
	 * @return
	 */
	public Map<String, ChannelApkConfigTimeModel> getTimeModelByMark(String mark, int daylimit);


	/**
	 * selectChannelApkConfigModel:查询模型
	 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
	 * @param configModel
	 * @return
	 */
	public List<ChannelApkConfigBaseModel> selectChannelApkConfigModel(ChannelApkConfigBaseModel configModel);

	/**
	 * getTimeRetentModelByMark:留存模型
	 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
	 * @param mark
	 * @return
	 */
	public Map<String, ChannelApkConfigTimeModel> getTimeRetentModelByMark(String mark);



	int getTimeLimit(String apk, int dayLimit);
}